Remove buggy detection code