Some amd64 fixes for variable types (int -> NSUInteger) and a few typos

PR for a couple of variables that should be declared as NSUInteger instead of int