Added a fix for deprecated variable declaration