fix variable bug