alert debug in tend()