fixed deprecated apis