Fixed toArray() method for boolean values
Fixed toArray() method for boolean values