wrong proper_exit function removed