fix getInitialState logic bug found by michael