added even more debugging to track down bug