Painting behaviour fixed