Fix issue when a class extension is found