Fixed photo view sort bug again - hopefully successfully this time.