Fixed bug regarding race conditions on savePrimaryImage with getProducts