Fixes for portal issue