Fix generation and use of grains

Change-Id: I93c253f2e8e33abc245c464d13fb255c8fdd5a6d
2 files changed