handle errors a bit more realistically