Adding assertion at the end, fixing tests.