fix usage of deprecated functions