fix type inference regression