fixed repainting