fix implicit cast that not all compilers support