Changed deprecated api call.