Replaced deprecated call with correct call