Fixed issue for hiding next and prev links