Handle errors better.