fixing margin issue with portfolio