fixed error propagation