fixed errors with ground generation