Fixed not so random number generation in quicksort