fix error bound bug