Fix a bug with reset.