fixing next link bug