fix for global debug problem