Casting to int to avoid warnings.