Fix quicksort

fixes #3