tests improvements

a tiny pack of fixes and improvements for tests