QueryInvocationHandler was refactored