fixed IME position save problem
add getLastRunMode, since restore now works too well