fix: ref-cnt for undefined proc variables