fix type conversion warnings