Fixed compiler warning (deprecated API call).