Help Fixing Macro

This is one of my favorite macros that I’ve used for years. It can be used with any toon, but this is an example how I use it with my shadow priest. It still works, but for some time now, I’ve been getting the error “Unknown macro option: target”. The error only seems to happen the first time it’s used per instance. I copied it from somewhere years ago so I’m sure it could use some streamlining/correcting. Basically in this example when an enemy is targeted it shows the Silence spell, when a friendly is targeted it shows the Purify Disease spell. They can then be used accordingly. Also if there is no target, Purify Disease is self cast. Again, this works flawlessly except for the error message which I would like to fix if possible. Thanks for any help.

#showtooltip [harm] Silence; [noharm] Purify Disease
/cast [mod:shift, @player] Purify Disease; [exists,noharm] Purify Disease; [harm] Silence; [notarget][@player] Purify Disease

Think I figured it out… Feel free to check it for me, but so far so good.

Thanks

#showtooltip [harm] Silence; [noharm] Purify Disease
/use [mod:shift,@player][help][noharm]Purify Disease;[harm]Silence