Fix #714 grep cancel problem