fixed a wrong variable usage