Added some debugging code related to issue #2