fix reset sequence