some fixes the sorting functionality doesn't work well