fixed bug with photo upload