Added fixes to work with buffer related operations