small fix for spawn

spawn and other fixes