Fix a host of 64bit warnings