fixing clip detection