Fixing type conversion