Fixed bug with ranking photos