fixed photo function for ipad