Fixed KeepAlive bug