upgrade API & fix warning
fix modal flow