removed app.close to make it more seamless