Fix bug on bulk photo upload and increment IDs (hack fix)