Updated to new API.