fixed exceptions in unit tests