Fix deprecated functions