some fixes for the portal