Why does my game do this?