Just realized I should use problem.terminate...