Moved loading outside of the Segment fire function