Fix TypeError during perfdiag