Crm 13159 plus a couple of minor fixes