add some limits to inbox queries to try to stop memory overflows