fixed bugs in magazine state machines