Fixing sort parameters