set undefined code to NULL