Fixed problems with unit tests