Minor changes on how ground profile is determined