trace: fix task state printout