More fixes on #638