something weird is happening with error comparison