Fixing various bugs.
Typo fix