fix unit spawn