fix a bug spotted by henning