fix some bugs

Change-Id: I3e9bae00cb69b7a66a3e2f120fc1dd39de361b19