fixed bug in initial state.