Fix bug of reset