The previous fix for issue #46 missed some cases. This corrects that.