Fix var being set to wrong line and add prefix to dumpvar