[issue249] fixed Buffer prototype & tests