fix-bug closure checkvalidity