fixed a grep bug