fixed the bug about terrains