Fixed minor bug in assertion checking