fixed various debugging bits