FIX some issues in test harness