fix lingering code plus a typo