two small (but major) bugfixes