Fixes on portfolio,activity and functions