inspector: Fix some problems found by inspector.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Merge pull request #205 from yangdongsheng/inspector

inspector: Fix some problems found by inspector.