Fix indent bug in gen.
Mark used packages correctly.