forgot to bind OnClose events