More fixes and assertions