fix using wrong variable.