fix error propagation