Replaced deprecated functions.