fixes region delete bug