Fixing debug mode