qSort fix for multiple value occurrence