fix an issue with optionals and change in xcode 6.1.1