Fix export and rename vars