fixed border issue (when painting)