Fixed a few issues with xcode 5