fix basicStateManager/cleanup