Fixed a small issue with sorting items