fix missing variable issue