Fix bug in assertion