Fixed issue with occasional timeout in test cases