Changed onSpawn() to use spawn coordinates instead of hard coded coordinates