remove seg fault on exit