Changed the spawning method to fix MySQL error 1318