fixed a small bug in calculating IQR