fix deprecated functions.