Fixed the issue in which local variable "Status" is used but not defined.