Fixed CustomPortal crash
Fixed crash when switching resource pack
Minor changes