preview works, can be hidden, app can be closed properly