Remedy deprecated function call