fix a few deprecated function calls