fix implicit cast