fixed paint bug