fix activerel query first, last, add specs