thise query gave NPE (now fixed)