My method is
1.Backup everything, photos, messages, app data using titanium backup, literally everything you need.
2.Store backups somewhere safe, especially titanium backup file(the whole thing).
3.Flash back stock rom and wiping everything.
5.Now you have a clean phone, root it again and restore titanium backup app datas,
But be sure to only restore games, apps, but not system files, it may causes crash.
6.Restore the rest of them.