fixed active link so end link is always the active one