64bit possible fix?
Cleaned some casting