Deal with errors better