That seemed to fix it.
But I ran into another problem, the bot was trying to put ores on the belt without paying the foreman. The pay timer still had 3 mins left on it but the time was up. Idk why it occurred, maybe because the world is a bit laggy and i lost connection? My internet is fine, it might be the server.
But I think there should be a failsafe for the pay timer, if the message pops up that you need to pay, the bot should reset the pay timer and pay the foreman again.