Change exit on close variable