Fixed bug in Generator and couple of other nits