phot error fixed