Fix argument checks for spawn and add specs