fix buffer type