Navmesh overshoots player

Hi all,
I have a script called Enemy Follow, and it sets the position of the enemy navmesh agent to my player in Update, but during the game the enemy goes past the player, then has to turn around. How can I fix this?

@mateuszwallace I want the enemy to follow the player, but when the enemy does follow the player, the enemy moves past him for some reason. That is what I want to fix.