CRM-12924, fixes / improvements