Implemented workaround for bug in State() class found by Jerome Maye