Add assertions that we are using the right token.
Fix compile error in debug mode.