fixes for hardware-style sorting