optimised some gamestatemachine stuff