Decoupling of heavy quarks in the minimal subtraction scheme