fix bugs in test cases for wifi