- fixed possible IllegalStateException (#4351)