Fix deprecated implicit cast.