Some trivial bug-fixes.
Signed-off-by: MORITA Shintaro <shin@sysphonic.com>