Fixes call to String's substring() method