Fixing deprecation notice