Fixes for compiling in debug-mode.