Added long as the activity type. Also fixed the bug when the activity
value is set to zero, when the corresponding document is updated in
hourglass
Fixed the problem with long range activity query