fix unitpainter