fix a variable bug