Fixed deprecated APIs