fix fatal error exiting program