TMP crash fix