fix bug enumeration that was causing it to generate ill typed programs