Updated type casting for new xcode

Xcode 6 wanted some type casting to remove warning messages