Fix c/p error and scope some vars to args