fix some drawing artifacts