Fix for deprecated functions