merge in changes from patch on AMQ-3997
Merge pull request #1 from jsimmonsc/master

Comparing with AMQ-3997, all looks good. Thanks @jsimmonsc