fix some bugs on portfolio manager