fixed loadPortals error