remove capability based on stop key literal instead of line count