bugfixes for last merge