fix unknown variable issue