Fix warnings with deprecated functions