fix module and type infer.