Cut logic for cuts longer or equal to string length was wrong