Fixes improper socket termination code