Bug solved: Application can exit now.