fixes to debugging to pass tests