I found a solution to the pathfinding problem.
I added a boolean value to the enemy instance variables which checks if the unit is colliding the CollisionDetection,
Enemy Is true>Wait 0,1 sec, Set False
If it's false The unit reverses its direction, but if it's true the unit can not change its direction.
So far this seems to have solved the problem.