Added and fixed some assertions