fix type conversion warning