fix activity query