Quick sort bug fixed