Fixes a 1.7 deprecation warning