Update things to handle errors better