Improved boolean values handling