Fix a few incorrect debug messages, and added a few more.