BUGFIX: used the wrong buffer.