fix grep bug