possible fix for an NPE in StateManager