fix some bugs of portfolio