Fix a bug with a wrong assertion.