Fix ordering (ascending/descending) and bounds