fixed up the debug switch