Fixed bugs in Portfolio.gbm