bugfixes for BW test