Fixing buffer append method