In Mag(f) use abs() instead of Abs(); seems Abs() has some kind of issue with vectorize(), I'll take a look on it when possible, even if since the introduction of vectorize() Abs() shouldn't be really needed.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects