minor change on picture sorting