Fix old api warning bug