Fix type conversion warning