more fixes from a full review (with mohamed)