reset current buffer when one gets deleted. resolves #399