fixed bug in get_first_occurrence where first occurrence has been varied