Fixed some ground insert bugs introduced in the last commit.