fix for process left hanging after application termination