fixed cq bugs