I don't think this is the right approach to turn off auto-correction.  You need to call deactivate to allow the old input method to free its dictionary. So see if you can just use deactivate instead of this disableAutoCorrection function.  If you need to, you can add more code to deactivate().