32bit compatibility

Small changes so the source compiles on x86 again