Fixed bug in calculating percentiles when array size == 1