small update to 'patchtool' (just fixed a range check)