Merge pull request #1440 from stevepiercy/1.5-branch

backports from master to 1.5 branch