fixes to debug hacks