So in your loop, you are checking for objects if nothing there, placing a cherry, move another 50 forward,
But if something is there, then you are not moving forward and doing box trace at same location.
What are you checking for, when you box trace?
In you picture, where is the arrow?