set debug check correctly for production