add debug guard

missing debug guard