Fixing Painting Bug.