wip fixed a ReferenceRegion end error.
debugging