Fix bug procedure