Fixes deprecation warning