Fixed initializing issues in sim_state