Fix referenceError message not defined