Jeremy Newman : fix some depreciated functions