fixed upload_db