fix error when no photo exist