Fix debug statement hook