Fix last page link bug