Add init function, get_upstream returning wrong point