Default Restoring Stock Kernel problem

I have been having issues restoring my Stock Kernel.

I made a backup in TWRP and then installed ElementalX 13.0

I had a few issues so tried to go back to stock. However it installs but when i then try to redownload my purchased apps i get an error saying unable to install to internal storage or SD card.

I'd rather not have to go through reinstalling the whole rom again so can anyone help as to why i am getting this error and how to solve it.

Thanks in advance