Typo fixed
Errors main_loop and sockfd fixed