created function to enable api termination by setting the --disable-api-termination flag to false