minor fixes to last commit + debugging outputs