Fix auto cast bug in Xcode. Thank happyfire.