fix spawn error