Fixed the problem with long range activity query