Fixes bugs with photo uploads