Changes made to avoid unit test hang