i know its unrelated to fix but shouldnt this trace be inside the next if ?