Global variables: loosing the value