Further improve error handling.
Make it less crashy