fixed error propagation.