Added some asserts.