fixing a bug in detection of boolean variables