Fix tests

The travis CI failure is unrelated, it's the stochastic one being discussed in issue #48.