Reapply fix made in #655