Bug fix for deprecation