fixed 64bit problem and class warning