Fixed bug in assertion logic.