fixed for XCode6 Beta 7

modified code to comply with Beta 7's syntax changes