fixed a few small issues with debug mode