Fix null pointer with tp-id.