fix error swallowing