Fix problems encountered on win64