NavMesh Agent Pushes Objects Through Floor

I have in my game a simple enemy character that uses a NavMesh Agent and a movement script to move towards the player. That works fine, but appears to be creating another issue. The NavMesh Agent and script are attached to a cube that serves as the enemy’s torso, and underneath it are two more cubes, childed to the torso, that are legs. When the enemy moves, the legs are pushed partially through the floor of my map.

Honestly, I don’t know for certain that the NavMesh is the cause of this, but it’s the only answer I can come up with. When the object doesn’t have a NavMesh or movement script on it, the legs rest on top of the floor as they should. Any ideas as to why this is happening and how I can resolve it? For reference, here is the enemy movement script attached to the torso:

using UnityEngine;
using System.Collections;

public class EnemyMovement : MonoBehaviour 
{

	Transform player;              
	NavMeshAgent agent;               
	
	
	void Awake()
	{
		player = GameObject.FindGameObjectWithTag("Player").transform;
		agent = GetComponent<NavMeshAgent>();
	}
	
	
	void OnTriggerStay()
	{
		agent.SetDestination(player.position);
	}

	void OnCollisionEnter(Collision collision)
	{
		if(collision.gameObject.tag == "MagShot")
		{
			agent.SetDestination(player.position);
		}
	}
}

I was able to solve the issue by increasing the BaseOffset variable in the Nav Mesh Agent component.