Added some assert statements.