More fixes to spawn and fetching ccimageid