Fixed bug where no initial state was set