Fixed string handling in debug_printf and an error in string passing implementation.