added missing code in flowgrind.c