error in closest before