fixing an error code that we send in tsmain.cpp