Fix terraingen for 64bit