Fixed an issue with quickSelect