remove the accept_sock function and fix some typo errors