Arm Rotation Error?

So I am in the process of making a gun system for a game. i have animated the guns but am getting a problem with how the arms rotate. here is a clip.

Does anyone know what is happening here?