Fixed problems with tests