check if photos exist stupid bug fix