Fix paintFrame