cherrypicking groovy patch for #10 into hydro