Applied PR on master and 5.1.
Gail Badner, if you want to apply this to 5.0, you can use this commit.