Fixed portfolio bugs