bugfixes for previous commits