ref #123 fix some state issues