fix compile method & change register to defvar