Fixed bug when editing a file with no protected regions.