couple of minor bugfixes to test