Fixing debug calls to be lazy when debug is off.