fixed pictures sorting issue