fixed photos not showing up, fixed sorting