improve Buffer type.