ticket:5 tests +some fixes