Fix debug-enabled tests