more format fixes to thal.c