Added an assertion in kernel