CRM-9744, CRM-12531

worked on CRM-9744, CRM-12531