Fixes compile issues accross 32/64bit targets

Just a bit of cleanup to avoid compile time errors for 64bit architectures