Bug fix for boolean generation