added ABT termination detection by message counting