fix a bug found during a recent upgrade