CRM-12427 Fixes and patch