Fixed typos

Tried some type casting to get around Xcode Beta’s bugs.