Fixed unit tests

Some error events happened