Agent throwing encoded errors many times making Agent disconect