WYCS: various bug fixes to test cases, etc.