Error handling tweaks.