I had a case where in the control.lua#187 would throw an error that "count" has to be a positive integer, my quick and dirty fix was to change the condition in line 185 to check if "to_add" is bigger than 10.
Unfortunately i didn't backup an affected save game so you just have my word that there is a bug waiting to be discovered.