fix occasionally failing test