Fixed all bugs in NZMG.cs