fix: free memory should include buffers