fix reset crash. #21