fixes automated closing