Fixed painting issue.