Typo fixes, thanks raven02. Fix deinitialization crashes.