bugfix.  This needs an automated test suite ...