integrated scott's terraingen fixes