Fixed crash on repaint (swing threading)