Fix debug() logging to work with previous changes.

#802