Help with Macro for Ret Paladin

Hi,
Trying to create a macro that will do a mouseover judgment cast (judgment on target if no mouseover) and also target the enemy. My macro works as intended for the first judgment, but when I try to mouseover to another target, it doesn’t change targets but will still cast judgment with the new mouseover target.

#showtooltip judgment
/cast [@mouseover] [] Judgment
/targetenemy

#showtooltip
/cast [@mouseover,harm,nodead] [] Judgment
/startattack