Fixed a bug with assigning a global value