Fixing boolean query values