Added some handling if the state isn't loaded