fixing empty photo model bug