bugfixes to last commit