fix compile error

fix compile error and  test for Xcode 6.1.1