Fix using name of wrong variable