Changed call to deprecated function