various fixes, and add heightfield