fix: an infinite repaint loop