fixing the debug messages