Fix for image header repaint bug