fix process exit