Fixed double close exception