fixed reset bugs