Portfolio model bug fixes