fixed old debug code problem