fix buffer type check and update readme