Pass the right variable when creating a new error.