Fixed bug in quantile filter