fixing debug switches
a fix
scripted update of code from master at c431174 a fix