Fix narrowing warnings