Fix "ReferenceError: data is not defined"