fix bug var end do not begin with var begin