Fix the extends bug.