Fix ShouldClose return type