Handling errors a bit better.