added some numerical stability to cq filters