default keepalive true for testing, some changes