Fixed some input problems
Found an error where the game crashes if you spawn a NPC while the player is moving