better logic for show link to first page