a couple buffer changes and encoding seting updates