--fixed for CRM-12275
Merge pull request #324 from pradpnayak/CRM-12275

--fixed for CRM-12275 Tested locally.