Newbie QuestionSetting MEP Space Phases

I am trying to change the MEP spaces which were set up in a different phase then the one we are currently on by using the following script. I am not getting any errors however it does not change the phases.

Thanks in advance.

Changing View Phase

I have noticed that when I synced it appears that I have a new set of MEP spaces and tags on the new phase but the old spaces still remain. Is there any reason why these extra spaces are created on another phase?

Thanks