fixes to unit tests