fixing debug console (debug mode added)