Fixes a bug in State.removeInner()