I don't know if this solves your problem, but it looks like both those blocks of code are running on each mouse click.
The first block (if WorkersAssigned ≥1) sets Minerals.WorkerAssigned to 0. Then the next block checks if Minerals.WorkerAssigned is ≥0, which it was just set to, so it runs as well.
If that's causing you problems, you could try putting an else statement in that second condition, so it reads "else if WorkersAssigned ≥0". That way the mouse click only checks for ≥1 or ≥0.
You might also need to pick a specific Minerals object. Right now, your actions are picking a random member of the Minerals family, which could also cause trouble (unless you only have on Minerals object).
Hope something in there is helpful!