fix accept functionality