bugfixes to prior changes