Fixes for compatability with Xcode 6