Pull request for bug #357

Hopefully you can do a cherry-pick of 4dbb714d if you just want to pick up this small change.