#116 Improve restricting query