Fixed problem when uploading images with same name