resolved issue #14 where select photos does not work after sorting. resolve sorting issue as well (it didn't work at all)