Fixed handling of boolean values within SQL queries