got application close stuff working