Second attempt at fixing #573.