Optimizing and Portfolio fix