Remove command infinite loop and update production database

Infinite while loop is caused when less than 3 images have been
submitted.