Improved error testing.