fixing the getHabits query.