Fixed type conversion warnings