Fixing debug check