Fix failing test cases

because of timing issues