Fixed: "ReferenceError: error is not defined"