fix previous/next and first/last pagination link