add assert to fix assert not defined issue