patch as transmited by charles cook
Merge pull request #1011 from tttp/crm12785

patch as transmited by charles cook