Fixed issue due to API change