Changes to to_bool method