set loader to null after spawning the entities