Fix two issues with setting input and generating results.

Change-Id: Iae622600b17144d22e114c1a700657e220c7198a