fixed bug of gamestate printing twice