Updating core not to use deprecated api