fix boolean problems.