Added some more debugging to help track down issues.