Fixes socket problem