fix wrongly shared var among processes