fixed foreign key issue with url to photo