Added some more debugging handling.