Fixes in photo upload