Fixing bug with player state management.