Fix some bugs

Signed-off-by: Jack Palevich <jackpal@google.com>