PB Qsort implementation and trying to reproduce the bug