Fixes #136 on the 3.0 maintenance branch.