Stop engin on Window close