inspector: Fix some problems found by inspector.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>