Fixes bugs in debug information generator and writer