Remove debug code
Fix buf