Fixed issue with openings sort