Fix closure bug