bug fix on portfolios