fixed bug in state manager persistence