fixed sorting so imgs with same title are always sorted in same order