fix bug with type inference for identifiers