fix paint bug