fix a deprecated function