Fixed crash bug.

Signed-off-by: Masashi Haraki <masa.haraki@gmail.com>