Some more tweaks for streamline error handling.