fix expansion of method calls