Added some debugging code to help hunt down a new potential bug