Fixes to images upload and save