fixed issue with ignored sort when no after or before param given