grep options not working correctly