Convert var to int