remove debugging and fix stats reporting