Fixed various warnings, also when compiling for 64-bit.