Fixed bug with missing return value in Save to buffer function.