Attaching brackets to their correlating position

I recently experienced a problem where I was trading 5 contracts with an SL only bracket on, I marketed out 3 contracts to take profits, but there was still a 5 contract SL order although I only had 2 contracts positioned and I had to go and manually change the number of contracts on the SL order, if the bracket orders could be attached to their position and be canceled when the position is no longer in the market, I think this would be a very good quality of life change for traders trading multiple contracts.