Fixed spawn function more