Fixed $next() and $previous() not returning anything