fixed bug when handling boolean values - thx to macflei