Finally fixed the Agent killing. It was a very stupid mistake, but it is fixed now.