tweaked ts debug errors ... and fixed bug