Fixes problem with conversion to and from the internal representation.