Added RedrawIfDirty method