Fixed how error codes are propagated
Fixed how error codes are propagated