trying to fix photo upload bugs