edit type castings for removing Xcode 5+'s warnings