Fixed a bug where calling .value on a BooleanVariable gives a

  class-cast error