fix for setting initial state