fixed before/afterExecuteQuery