use new Amplify JSON API
bugfix