Rewrite the nms part, fix nope error completely