fixing a bad copy/paste and fixing a corner case