added activity for individual bug
fixed bug in query construction