fix null pointer casued by empty id field