Fix the assertion in the scoping