Fix some Error handling.