Fixed recursive calling of close().

Signed-off-by: Tsuyoshi Ozawa <ozawa.tsuyoshi@gmail.com>