Changes to tstattype handling