fix some obsolete function