Cherry-picking fixes.

Signed-off-by: baked <travp624@gmail.com>