fix a potential corruption in accept()