fix a few deprecated API calls