Another fix to the quick sort