#324: Fixed images already uploaded
#324: removed unused variable