Fix bugs with snippet initialization.
Continue correcting state.