tornado debug bug fix