ported fix from router application to portal