fixed upload_locations bugs