Fix spawn bug