Fix when keepalive option is set to false