fixes for npe in /tp-id