Npcs spawning in air

How are my npcs spawning in the air, i know it has to do with something with displacement but where would i start