Fixed 10.7 and 10.9 deprecations