Fix switch to debug mode