fixed bug when handling boolean values