fix bugs in sdk 7