Some fix and add test for assert