Fix termination on startup