correct a undefined error