window closes now when submited