Fix incorrect variable usage and quoting.