fix bug:
#Changing major mode will leak local overlays in the buffer.