Replace deprecated functions by new ones