fixes for Buffer