Fix error capture.
Handle None old_location when editing.