Fixing up the sorting window