fix filterclause bugs