Added "Closed" detection