type promotion fixes