Fixed issue due to new API changes.