Fixing typo, and adding code that was added at the wrong place.