Fixed Buffer bug