Make main variables volatile