Switched out deprecated function.