Some fixes and changes in logic
Some changes in QueryHelper methods