fix bugs.

Change-Id: Id9e8a297d4ff60c841caf33d7a474520bad1ec5e