Changes for work with new API.