fix minor bug in SWING generator