handle errors a bit better