Call loadSync instead of api.load (inside the loadSync method)