Fix occasional failures in Travis caused by ugly race condition on slow machines