Fix bug in portfolio