fixed xcode 6.1 compiler errors