Fixed widget closure bug