Fix intermittent travis failures