fix the accept query