type conversion to fix compile error in xcode 5.1