Cleaned up nanmad -> mad issues