get rid of depracated managedQuery call which was causing crashes