fix compute_error