Should also handle error case.