Fix spawn_sh crash