Additional changes and notices fix for CRM-15540
Merge pull request #4480 from rohankatkar/CRM_15540

Additional changes and notices fix for CRM-15540