fix error clobbering