Update: Fixed scope issues