modified returned errors in tests