Fix painting dirty areas