Fixed a potential bug when printing debugging information.