fix small bug in Swing generator