Switched to proper method instead of deprecated one