Fix some reset bugs.