Fix missing references and add some arguments