Disable debugging with some cleanup