fix undefined error.