generator bug fix ~ arithmetic