Quick fix to use the same buffer type thats used for creating the data when setting the data.