Fix recursiveExtend bug