Fixed exit function, prevented duplicate forks when null entered