cherry-pick one commit into master

this should go into master as well. I had this issue in my 1.3.1 install and that patch fixed it.