Fix socket read