fixed deprecated functions.