Fix sorted select