improved debuggability and maybe fixed a bug