Bug fixes

Change-Id: I9bc643ec3c7cd7c7dccfd16b49a09ba39daef9c9