fix accept logic