Another bug fix for agenda api, ranges now works