fixed, on line 222 replace
event.surface.create_entity{name=type, amount=amount, position={x, y}, enable_tree_removal=false, enable_cliff_removal=false}
with
event.surface.create_entity{name=type, amount=math.max(amount,1), position={x, y}, enable_tree_removal=false, enable_cliff_removal=false}
probably a better place to put the fix but this works