fix onpaint