Fix intermittent breaking test