Fix painting issues.