Should there not be a set of braces around the IF, for the case no_sort statement?