fix some bugs

Change-Id: I768363861744a5f341cb45a63d316a4082cecc2a